package com.hjm.project.record.purchaserRecord.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;
import com.hjm.project.record.purchaserRecord.mapper.PurchaserUpdateRecordMapper;
import com.hjm.project.record.purchaserRecord.domain.PurchaserUpdateRecord;
import com.hjm.project.record.purchaserRecord.service.IPurchaserUpdateRecordService;
import com.hjm.common.utils.text.Convert;

import javax.annotation.Resource;

/**
 * 终端购买人变更记录Service业务层处理
 * 
 * @author maker-platform
 * @date 2022-10-31
 */
@Service
public class PurchaserUpdateRecordServiceImpl implements IPurchaserUpdateRecordService {
    @Resource
    private PurchaserUpdateRecordMapper purchaserUpdateRecordMapper;

    /**
     * 查询终端购买人变更记录
     * 
     * @param id 终端购买人变更记录ID
     * @return 终端购买人变更记录
     */
    @Override
    public PurchaserUpdateRecord selectPurchaserUpdateRecordById(Integer id) {
        return purchaserUpdateRecordMapper.selectPurchaserUpdateRecordById(id);
    }

    /**
     * 查询终端购买人变更记录列表
     * 
     * @param purchaserUpdateRecord 终端购买人变更记录
     * @return 终端购买人变更记录
     */
    @Override
    public List<PurchaserUpdateRecord> selectPurchaserUpdateRecordList(PurchaserUpdateRecord purchaserUpdateRecord) {
        return purchaserUpdateRecordMapper.selectPurchaserUpdateRecordList(purchaserUpdateRecord);
    }

    /**
     * 查询终端购买人变更记录详情
     *
     * @param purchaserUpdateRecord 终端购买人变更记录详情
     * @return 终端购买人变更记录
     */
    @Override
    public List<PurchaserUpdateRecord> selectPurchaserUpdateRecordDetail(PurchaserUpdateRecord purchaserUpdateRecord) {
        return purchaserUpdateRecordMapper.selectPurchaserUpdateRecordDetail(purchaserUpdateRecord);
    }

    /**
     * 查询终端购买人变更记录列表
     *
     * @param purchaserUpdateRecord 终端购买人变更记录
     * @return 终端购买人变更记录 一个结果
     */
    @Override
    public PurchaserUpdateRecord selectPurchaserUpdateRecordOne(PurchaserUpdateRecord purchaserUpdateRecord) {
        return purchaserUpdateRecordMapper.selectPurchaserUpdateRecordOne(purchaserUpdateRecord);
    }

    /**
     * 新增终端购买人变更记录
     * 
     * @param purchaserUpdateRecord 终端购买人变更记录
     * @return 结果
     */
    @Override
    public int insertPurchaserUpdateRecord(PurchaserUpdateRecord purchaserUpdateRecord) {
        return purchaserUpdateRecordMapper.insertPurchaserUpdateRecord(purchaserUpdateRecord);
    }

    /**
     * 修改终端购买人变更记录
     * 
     * @param purchaserUpdateRecord 终端购买人变更记录
     * @return 结果
     */
    @Override
    public int updatePurchaserUpdateRecord(PurchaserUpdateRecord purchaserUpdateRecord) {
        return purchaserUpdateRecordMapper.updatePurchaserUpdateRecord(purchaserUpdateRecord);
    }

    /**
     * 删除终端购买人变更记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deletePurchaserUpdateRecordByIds(String ids) {
        return purchaserUpdateRecordMapper.deletePurchaserUpdateRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除终端购买人变更记录信息
     * 
     * @param id 终端购买人变更记录ID
     * @return 结果
     */
    @Override
    public int deletePurchaserUpdateRecordById(Integer id) {
        return purchaserUpdateRecordMapper.deletePurchaserUpdateRecordById(id);
    }

    /**
     * 获取批次号
     * @return
     */
    public long selectPurchaserBatch(){
        return purchaserUpdateRecordMapper.selectPurchaserBatch();
    }
}
